package com.huangpuweb.api.model;

import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class YearSpotWarnMapper implements RowMapper<YearSpotWarn> {
    @Override
    public YearSpotWarn mapRow(ResultSet rs, int rowNum) throws SQLException {
        YearSpotWarn yearSpotWarn = new YearSpotWarn();
        yearSpotWarn.setSpotCode(rs.getString("spotCode"));
        yearSpotWarn.setWarningnumber(rs.getString("sum(warningNumber)"));
        return yearSpotWarn;
    }
}
